package top.xphu.zip.entiy;
import org.apache.commons.lang3.StringUtils;

import java.io.InputStream;

/**
 * 文件流的封装
 * @author xphu
 * @version 1.0
 * @date 2021/6/29 16:29
 */
public class ZFileInputStream {
    private String fileName;
    private InputStream fileBody;

    public ZFileInputStream(){}
    public ZFileInputStream(String fileName, InputStream fileBody){
        this.fileName = fileName;
        this.fileBody = fileBody;
    }

    public static boolean isNotNull(ZFileInputStream zfis){
        return (zfis != null && zfis.fileBody != null && StringUtils.isNotBlank(zfis.fileName));
    }

    public String getFileName() {
        return fileName;
    }

    public void setFileName(String fileName) {
        this.fileName = fileName;
    }

    public InputStream getFileBody() {
        return fileBody;
    }

    public void setFileBody(InputStream fileBody) {
        this.fileBody = fileBody;
    }
}
